package com.platform.wechat.mapper;

import com.platform.wechat.entity.Hospital;
import com.platform.wechat.entity.Offices;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface OfficesMapper {
    /**
     * 根据主科室查询科室信息
     * @param chiefofficesId
     * @return
     */
    List<Offices> selectByParentId(Integer chiefofficesId);

    int deleteByPrimaryKey(Integer officesId);

    int insert(Offices record);

    int insertSelective(Offices record);
    
    /** 
    * @Date: 2021/8/2 9:52
    * @Author: guopeixin
    * @Description:  查一个通过officesId
    */
    Offices selectByPrimaryKey(@Param("officesId") Integer officesId);


    Offices selectByChiefofficesId(Integer chiefofficesId);

    int updateByPrimaryKeySelective(Offices record);

    int updateByPrimaryKey(Offices record);

    //模糊查询
    List<Offices> selectInHospitalById(Integer hospitalId);
}